Merge #474 with suggested changes

This is basically PR #474 with the following changes:
- perltidy
- adding author in header
- failing test if the file is not found
- add documentation for has_stat