NEXUS-5734: Ahem, wrongly placed condition

And UT actually tests it IS thrown, so passed
and not caught, but all the other UTs did.
NEXUS-5734: Reworked imple

As initial imple was pretty much to strict.
So now the constraint is applied only to files
got from remote, as it was initially intended