Fixed some bugs in 12-hour parsing/formatting
Added test for issue #4