Fix for untitled editors in containing-path

A minor fix which mirrors the`by-path` implementation – previously this barfed on unsaved files.