A couple of fixes for a case when buffer has no filepath assigned to it.