gpstk_builder.py file copying fix

This will fix the situation when target directory for python libs is located, for example, on a different partition (splitting */home* and root is common), and **os.rename** throws an error, resulting in no files being copied at all.

It also closes the handle of the generated file beforehand to prevent incomplete copy.