improved arbitrary integer support

Added functions for exporting the integer into a fixed-width format.
Implemented checking to determine if the integer fits with a given fixed-width
format. Fixed bug when printing out the zero value.
fixed support in printf for double percent

Fixed a bug in printf that prevented passing through an escaped percent.