Fixes rouge newlines caused by bash HEREDOC usage
Merge pull request #8 from mrak/master

Fixes trailing newlines caused by bash HEREDOC usage