Integrated changes from https://github.com/Sage-Bionetworks/synapsePythonClient/pull/68/ due to overlapping fixes.