makemap.sed handling for direct output

This handles funky newlines and trims trailing junk, albeit in a not
particularly elegant way.
Sync map.js for 2013-06-07 update

This update triggered cascading map ID changes. This system needs
rewriting to handle automatic adjustment of map IDs.

Perhaps the logging format should be changed to log the stable ID?