Reduce duplication in use of inputHistory.

Replaces repeated patterns for clearing and appending to the input history with single function calls. This would be worth doing for its own sake to make the code simpler, but it has the side benefit that it gives a way to "hook" pushInput for monitoring/tracing if anybody ever wants to do something like that.
Fix #226

This was an easy typo and GitHub makes this kind of change easy, so here you go.
Fix #213

Just trying to get the bug count down a bit before I do some research with PuzzleScript over the summer!
Preserve input history across rebuild in editor.
Merge pull request #247 from rmmh/master

Bug Fixes
Merge pull request #248 from increpare/master

pull
adding unit tests for
https://github.com/increpare/PuzzleScript/commit/85e70657cb619f4805016c745a30277eb0c1a0e4
https://github.com/increpare/PuzzleScript/commit/9d2c140ba7b22e5854bce4e6a70192f36c77cbbd
Merge pull request #249 from rmmh/master

Fix #217: make export escape $ in replacement string
Merge pull request #250 from increpare/master

merge fixes from master
increment version number to 1.4.1
Merge pull request #235 from JoeOsborn/patch-2

Fix #213
Merge pull request #234 from JoeOsborn/patch-1

Fix #226
Merge pull request #233 from JoeOsborn/refactor-inputhistory

Reduce duplication in use of inputHistory.