We were unconditionally checking against the cwd for relative paths, which isn't conformant to posix's path search logic. This commit revises the search to only do so if the requested executable starts with either a `.` or `..` path component. In addition, we now also allow for path components in $PATH to specify cwd-relative paths. refs: #4920