Use /run/shm instead of /dev/shm as memory file system

/run/shm is the standard. (maybe)
Make tmpfs availability check more strict