Added control if out file exists in getFlashResult function.
Simplified disconnect() function. Removed unecessary try-catch blocks.
Rearranged try-catch blocks in serialWrite function. Added specific exceptions that Serial::SerialImpl::write function may throw.
Modified else statement in case outfile is missing.
  Modified try-catch blocks in serialReader function. Added specific exceptions that serialPort.read may throw instead of a generic try-catch.
Added notify("disconnect") to catch block "serialReader() threw an unknown exception."
* Removed process and thread variables declaration in Unix.
* Removed getThreadId function declaration.
* Added closedPort variable to be used in disconnect() call control.
* Added control in disconnect() call in function serialWrite.
* Added control in disconnect() call in function serialReader.
Added return in generic catch block of serialReader function.
  Added return in generic catch block of serialWrite function.
  Added notify("disconnect") in generic catch block of serialWrite function.
Merge branch 'bug_fixing_dev' of github.com:codebendercc/npapiPlugins into bug_fixing_dev