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

Signed-off-by: Andrew Page <admwiggin@gmail.com>
Merge pull request #9637 from tianon/minor-nuke-fixes

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