Revert "Merge pull request #93 from penpen/patch-1"

This reverts commit a745c1844a7d358d534337adc4c69965c94dc345, reversing
changes made to 8dfbbfdce6fbf4e7eab41b6ac9933c5356b834db. Reverting because it
completely broke caching.
Add option cacheFile
Move test setup into common function
Add tests for cacheFile
Fix tests
Fixing the paths to be based on the running environment for the cache file tests.