Old fix had bug with non-git dirs, fixed that, but newline bug still persists