Updated gitags function to work in OSX.