Enable debug mode for testing, fix cache, build dir and PATH variables.