Permission character escape mistake.

Due to the escaping of ' cahracters, the function didn't get it's value and resulted in not being able to set download permissions.
Merge pull request #373 from Lord-Simon/master

Fixed not being able to set Download Permissions because of character escape mistake.
Merge remote-tracking branch 'origin/master' into devel
removed unnecessary import in test.