If the buffer is an indirect clone, it may not have a buffer-file-name. Also changes the command to throw an error if the current file has no file path *and* is not a dired buffer.