Make ensuredir more general.

Put it in cmd/mid/game.c for now to avoid the questionable creation of
lib/os/dir.c during this change set.
Store the player's direction in an enum instead of a pointer.

This will be necessary for saving the player's direction. We cannot
save a pointer, and we cannot use pointer equality to compute the
player's direction since we copy the Player in some places (the
p->anim pointer will point to the p->leftas or p->rightas field of the
original, not the copy). Additionally, this is more consistent with
how we handle p->act.
Add print and scan functions for Player.

And other types necessary to save and restore the Player.
Make the camera setting per-screen.

When a new screen is pushed, the camera is saved and reset. When a
screen is popped, the camera is restored to the value just before the
corresponding push.
Add gamesave and gameload.
Save when accessing a statup envorinment and add restore to the title screen.

Fixes #3.