Changes to build boot loader with python3 on Mac OS X.

Maxint is depreciated in python3 so replace with maxsize.

Change except and print syntax to python3 syntax.