Factor out mkpathat.
Add "volatile" annotation to peek/poke to stop potential optimizer overreach.
Move mkpathat to lib, remove redundant function used by patch.
Patch from Isaac Dunham to add cpio -d, with a few tweaks by me.