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.
Merge pull request #3518 from Michagogo/linearize-start-value

Tweak linearize.py to give more flexibility