This got lost at some point.
Make sure we're in the main thread only.
Fix some argument parsing. Make sure we're resolving absolute paths.