Added check for hidden file extension. Fixes #1