Fixed build dialog, line-termination, and import snafus.

Ideally, in the future:

1. All data translations should happen at the file system border.  The line-termination issue only happened because of the schizophrenic nature of the current code (i.e. auto-decoding at the input border, via codec.open(), which does not modify line-termination, then manually doing encoding, via .encode(), and using open() at the output border, which does modify line-termination, unless binary mode is specified).  It would be better to do one or the other consistently, either:
        A. Use codec.open() on both borders, letting it automatically decode/-encode, and not modify line-termination at all.
        B. Use open(), in text mode, on both borders and manually decode/encode, so line-termination is consistently modified.

2. HTML processing should really be switched over to use one of the HTML libraries.