swift-import: move parsefile to a separate function, add export stub
swift-import: some tests for swift-import.pl