Replace isinstance(value, file) with a Py2+3 compatible hasattr check for fileno.
Replace isinstance(value, file) with a Py2+3 compatible hasattr check for fileno.

Re #437

pyinvoke/invoke,pyinvoke/invoke