Fix #1898 by doing an initial call to `datetime.strptime`

This commit works around an upstream threading bug
http://bugs.python.org/issue7980 which affects Mac OS X. It includes a
test which is skipped by default because it will not always fail.
Merge pull request #1940 from danielgtaylor/strptime-bug

Fix #1898, #1940 by doing an initial call to `datetime.strptime`