Merging improvements from the NME fork of the format library

git-svn-id: http://hxformat.googlecode.com/svn/trunk@243 21d757a5-8d53-0410-89ca-7355cf17ce49