In the wrappers, check for errors and abort if one is raised. At some
point it may be useful to have a mechanism to ignore errors, but I'm not
sure yet how that should look.
For chmod, let the mode be specified as an octal number, otherwise it's
quite hard to understand what's happening. Note that this must be
specified as a string, otherwise tonumber() will raise an error.