Fixes to swapfile permissions and to implied OS support

This is a nice module which I'm now using, but I had to fix a few issues. The commit messages should be pretty self-explanatory but if you have any questions just let me know.