Python 3 compatiblity: no unicode literals for 3.2 and safeguard against loop during copy operation.