Refactor code to ease maintenance

The following bugs were fixed during refactoring:
 * Compiler can be used standalone without side effects
 * The local compiler/shellpipe is not changed after writing a file
 * Error text will now be echoed in .hrl files
 * Error text will only be echoed for the last check
Merge pull request #3 from fishcakez/refactor

Refactor code to ease maintenance