Python 3 compatibility for Rule class

It's probably not the cleanest way to do it, but at least the Rule class is more or less useable on Python 3 now, and Flask's app.url_map won't crash anymore.