Fix caching when composer is installed in custom path

Here is the pull request to fix the composer installed in a custom folder. 
Fix #721