Some changes to make scp work with python 2 and 3