Add option to disable writing to local cache

This is a first step to allow use with buildbox-casd where direct filesystem writes to the local cache are no longer permitted. The longer term goal is still to implement #29 (closed), however, that's not strictly necessary yet.