Add custom buildpack support and test, plus various fixes