fix failure on second recompile

the previous commit made sure to create a cache directory if there
wasn't one already, but was throwing an exception if the cache directory
was already there.