improve path checking, now using Pathname instead of regex
fix minor docs quirk