I gave up keeping animals as they seemed to disappear from the fenced area...not escaped but just disappeared. I have not tested this on the 0.4.0 release so this may be fixed already. Do they just grow old and die?
After several attempts to replicate the problem it has occurred when the player is on a stair-block with a ceiling that is two-blocks high or on a half-block with a ceiling that is two blocks above and is a half-block.
I agree with Troy, door etc status does not seem to get saved when the game is paused and then exited. When the game restarts the most recently closed doors are often open. At first I thought this was a feature to make the game more interesting but now I beieve it is a bug involved with saving the status of the door during pause or save operations.