Added deploy script, fixed some bugs in pubrepo