Test for read-only filesystems, fixes bug 378869

If any read-only filesystems need writing, bail out and display a
useful error message.

v2: Reformat, add a function to return an appropriate read-only checker
for the operating system, so that this can be extended to other OSes.

v3: minor formatting tweaks from bernalex, including use os.path.join()
instead of string concatenation

v4: Update copyright header, change the code in rochecker to open with
io.open in order to not break on non-ascii characters as reported by
Arfrever. Change get_ro_checker to use a dict as suggested by vapier.

v5: Fix comment format as requested by vapier.

v6: Change linux_ro_checker to use set.intersection instead of the
longer check-and-append system as suggested by vapier.

v7: rename rochecker -> writeable_check
2 files changed