giscanner: Use Python 3 compatible octal literal syntax

https://bugzilla.gnome.org/show_bug.cgi?id=679438
giscanner: Use modern exception handling for Python 3 compatibility

https://bugzilla.gnome.org/show_bug.cgi?id=679438
giscanner: Use range instead of xrange for Python 3 compatibility

https://bugzilla.gnome.org/show_bug.cgi?id=679438