Fix various issues with CLI and creating .pem and .crx files

If directory is not specified, we'll assume current working directory for all options. If .pem file is not specified, we will create one automatically (like the docs say) and will continue operation. Added a little more error handling.