Allow server to choose network and added joptsimple to verify command line arguments.

Checking in the server separately with the network choosing capability and joptsimple parameter checking.

Added in an assert for checking of BuildFileList. Didn't need specifically changing, but its just a tad more elegant. Can just remove this back to normal.

File-directory is required and is checked when building the filelist.
Network defaults to mainnet and can only have the parameters (mainnet, testnet and regtest). It is not required.
Port not required. Defaults to PORT, and checks for integer.