build: Create the cache directory, if it doesn't yet exist
build: Fix cache behavior
build: Make environment available even after a cache hit