Improved git root alias with some error checking.