Fixing build script to clean up old versions