simpleperf: fix finding app's process.

Also check the return value of recording, fix some tiny errors in tests.

Bug: None.
Test: run test.py.
Change-Id: I42b33c796a302b71ca1c87888b4a2e9ad53306af
4 files changed