Enforce that paths are non-empty strings

Previously only the length was checked which would allow more than
just strings to be checked.
2.3.2