Cache build outputs

Cache build outputs into the TMP directory. This should be more useful than just the modified response headers = which can be ignored by browser hard refreshes.

Refs #218
Good point, I've changed the code to only chmod when the directory is created. See dcebb3f05da09b19e463f33621ec76a229a6f660