fixed parse_git_dirty

git status output isn't always the same, so the function now uses "git status -z" for the backwards-compatible and machine-readable output. If the ouput with -z is empty, then the working dir is clean.

Also, I'm using the test ([) program because... yeah.