Make CACHE_DIR and BUILD_DIR available to the custom build script

so that it could be more efficient (e.g. cache stuff between builds).
Merge pull request #24 from maio/pass-build-and-cache-dir

Make CACHE_DIR and BUILD_DIR available to the custom build script