Stop report crashing due to bad pathname parsing

Also adds a test for the condition, hyphens in a containing directory.
This crash was uncovered by accident when running a report on samples
accidentally saved in a Gitiles download directory, which always
contains a hyphen in its name :|.

Change-Id: I565ff58b33b136209feeb46e5d95a56547a1111d
8 files changed