Merged in tubastian/pycat-apns (pull request #1)

Fixed a major and a minor bug.