Use string substitution and shell redirection that works with dash.
Merge pull request #2 from coonsta/master

Use string substitution and shell redirection that works with dash.