Improved version of file permission tests

Hi,

I improved the file permission test by

* Making the api consistent with the other `check_`-methods
* Better test suite
* Now strings are compared which gives you a better error message if there is a difference between the expected and the real permissions of a file