Make magit-save-buffers-predicate-tree-only more robust

This is similar to the previous commit.  String-prefix-p is a fragile
way to determine if a file is contained in a subdirectory.
(File-in-directory-p is normally the right thing to use for that, but
it will hit tramp.)