Added the option to use a variable path by starting the argument with $. Also the cachedir can be inferred from the path.