testsuite: Check file permissions
Add a check to the filesystem test cases for sane permissions of data files and
executables. In particular, this ensures that the executable bit is set where
it makes sense (directories and programs), but not on mere data files.
We currently ignore known-broken file systems like vfat and ntfs.
This is the groundwork to fix this behaviour at least on vfat. Its current
behaviour is quite unnerving, since trying to open a file on them in e. g.
GNOME will always ask for "do you want to open or run this file".