(open_path): Don't do strlen on DIRPATH if it's null.