fix timeout problem

Timeout was not properly calculated after the commit
bea18e2771455ec164f8d951dc2fc48987db073c.
Improved s:system performance
Merge pull request #146 from ichizok/improve-system

Improved s:system performance
Fix s:read_lines()
Improve parser
Fix read line
Fix read_line problem
WIP: Improved portability to AIX, HP-UX