Make .profile.d scripts and hooks compatible
Make .profile.d scripts and hooks compatible

- hooks should come before writing to .profile.d directory

[#145118801]

Signed-off-by: Dave Goddard <bfcdf3e6ca6cef45543bfbb57509c92aec9a39fb@goddard.id.au>

cloudfoundry/go-buildpack,cloudfoundry/go-buildpack,cloudfoundry/go-buildpack