Use umask when doing "chmod +x". Improved version of pull request #18

This improves upon #18:

- Tests, woohoo!

- The permissions are set correctly. #18 would always set the executable bits, giving you for instance `-rwx--x--x` where you would expect `-rwx------`.

- The method used is the one Distrubute uses.