Replaces ~ by ' ' in TeXs (thanks to @larsrh for reporting this).
Adds unit tests for this.
Merge pull request #5 from nightraven/integrationtests

Replaces ~ by ' ' in TeXs (thanks to @larsrh for reporting this).