Arguments must be nullchecked before being used.

Fixes #1840.
Ensure the FlatFile directory exists.

Fixes #1842
The command is spelled xpshare, not expshare.

Fixes #1841