Fix mksock to wait for the socket to be created.
Add tests for all remaining file types.