handle non-shallow clones

For local clones and clones by travis of repos with less than 50 commits `git fetch --unshallow` was throwing a fatal error.

Also, it's probably a little cleaner to do repo manipulation stuff in the `before_install` section.
Merge pull request #421 from WestleyArgentum/patch-2

handle non-shallow clones