Improved file name checking
Added encoding magic comment for 1.9
Fixed Windows regex
Merge pull request #86 from kl/master

Improved file name checking