Modifying utils.findCommonBase to only find common directory base, not filename parts, and adding environmental checks for path separators. Also adding test coverage.