Fix a bashism and some minor bugs in nuke-graph-directory.sh