Allow . files to be created

Fixes: https://github.com/gitlabhq/gitlabhq/issues/5770
Merge pull request #6050 from jvanbaarsen/regex-fix

Allow . files to be created