Renaming test.swift to example.swift

This isn't really a test file, so example.swift is more accurate.
Getting example.swift program name from executable name
Treating nil input to example.swift as call for standard input
Refactoring example.swift and adding addition information