tumblr_backup: streamline -i option handling
tumblr_backup: improve -p option handling

Verify that the argument is an integer if it isn't one of the
shortcuts y, m or d.

Isolate the gritty timestamp mangling into its own function.