Just after having written Create dot-file, I found this over at serverfault. It turns out you can create dot-files (and folders) by simply adding an extra dot at the end when you rename it. For example ".htaccess." will result in the file .htaccess being created and the "You must type a file name"-dialog is never shown. So my utility isn't needed anymore! I'll leave it around if you want to get it anyway.