Changed bash git dirty check to 1.7/1.8 compatible way