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.