Fix #485: reliance on english system error message

Fix for #485.
Instead of checking the string system error message `permission denied` (which maybe localized, so the match fails on non-English locales), check `$!` by comparing it to `Errno::EACCES`.