Improve inProject detection, and sanitize the filenames in a stacktrace