removing duplication of code

Removed the code duplication in Ember.copy.