better parsing of lsof output, add test for it