Safer code for the following situations:
1. glyph requests for a font, where these glyphs are out of range. type 1 needed correction
2. trying to create a log file in a place where it's not possible, will enter infinite loop. corrected
Merge branch 'master' of github.com:galkahana/PDF-Writer