Extract swift command line generation into SwiftCommand class
Set build dir option only if build dir exists
Merge branch 'ld-build-dir-warning'