Improving insteadof.sh script for ssh situations.