NIO-66 Abstract out reusable portion of update_script

Signed-off-by: Oren Leiman <oleiman@neutral.io>