Update main.cpp

Fixes a not-so-obvious segfault while submitting share to the pool and -o is not supplied by the user.
Merge pull request #3 from ofcaah/patch-1

Update main.cpp