POSIX shell compatibility.

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
Merge pull request #1 from lamby/master

No need to be a Bash-specific script