Add unit tests for mch_[gs]etperm.

Use preprocessor trick proposed by @mahkoh to import 'defines' like
S_IRUSR.
Move and refactor mch_[gs]etperm to os/fs module.
Revive vim_fname (-> os_file_exists); fix misuse of mch_getperm.

* Move vim_fname from misc1 to os/fs:os_file_exists.
* Add unit tests for os_file_exists.
* Replace misuse of mch_getperm with os_file_exists.