Deploy fixes

Clean dependencies if preparing a binary deployment

Don't use FileUtils.cd when creating the by-id link
Fix python jenkins shell commands