Fixed whitespace and /dev/null redirection

Replaces previous pull request with a more basic one - no changes to paths etc.