[CopyResourcesScript] Restore compatiblity with Ruby 1.8.7