Make this work with Python 3, and do some minor cleanup

Works with Python 3.3.5 and 2.7.7 and the latest version of icalendar.
Could you restore this blank lines, as per PEP8 there should be 2 blank lines between top-level functions and classes?