Refactor prepare release script

* Shorter script name
* Extracted main into own function
* Only one level of elif's
* Some doc and whitespace fixes

Change-Id: I3f383ab442842c5cf4a6fa1cfcb99bd5549801c7