Sorry, I should have mentioned that at the stand up we decided to short-circuit the error message for dots as well because it was a little nicer to say it isn't allowed rather than the file already exists.

As for the regex suggestion: 
I thought about it as I was writing and was pretty sure that, since the indexOf comparison is done in native code, that a simple string comparison is faster than pattern matching.  

See this article: http://stackoverflow.com/questions/9380062/is-using-a-regular-expression-faster-than-indexof 

It looks like indexOf is faster but maybe not much.