Tweak linearize.py to give more flexibility

Add the ability to start at a non-zero height, and allow for appending to
an existing file.

(note that I don't know much Python, this is based on a quick Google result of xrange()'s behavior, and copying the style of max_height...)