Improved:
1) handling of cache directory with multiple levels ( test/cache/1/ )
2) handling of directory name without trailing /
   Before cache files would not be stored in the directory as expected.

By using path.Join(), directory paths are also cleaned.
path.Clean is redundant, path.Join will do that anyway
Merge pull request #2 from tompao/fix-dir

Improved handling of cache directories