Improved buildswift.sh script