Various improvements

* Refactored and reformatted various bits of code (code style, testability etc.)
* Added file path formatting option (can print full file paths, take base names only or leave them intact)
* Implemented few unit tests and configured Travis CI build