fixed a bug with a newer git version

git rev-parse HEAD fails if there is no commit yet (first deploy)
Merge pull request #4 from stefreak/master

Thanks!