Enhance efficiency and fault tolerance of type conversion

Use str type as much as possible on Py2 instead of unicode
Convert from bytes to unicode with errors=replace on Py3 to prevent unicode encoding if some bad data slips in
FIx formatting
Fix type of pid from command-line
Increase default timeout in case travis is slow on GitHub
Merge pull request #674 from scottkmaxwell/fault_tolerant_byte_conversion

Enhance efficiency and fault tolerance of type conversion. Also includes fix to command-line `signal` command.