Minor code improvements.
Use AssumeNG for platform-specific unit tests.
Prepare path sanitizer for #10671 configurability.
Merge pull request #1085 from mtbc/code-tidying

tidying of path-related code