Handle relative paths in is_dir.

#1726

same issue exists for is_file, I'm making a separate issue / PR.