Refactor shm_{open,unlink} code to separate Linux-specific directory choice from...