Simplify file name validation

We don't want to expose possible hidden files as well (starting with .
on unix).