magit-save-buffers-predicate-tree-only: bugfix

This function might end up being called outside a repository (because it
is used carelessly, see next branch for a better approach) so we have to
make sure it does not try anything stupid in that case.  Fixes #1499.
Merge branch 'master' into next

Conflicts:
	magit.el

Merge fix to code with no longer exist on 'next',
i.e. drop their side