suggestions based on code-review.

* you now pass an absolute path to a file.
* use stat instead of exists.
* added travis configuration.