bug - if parent directory of $cachedir does not exist the module would
fail.