Optional cd zip

Please extract this to one function (using this twice from different places) in server.rb file.