shm-file: remove directory hierarchy on destroy