fixed regex in file validator

Fixes #16,#17,#19 (or should fix)