If a resource file cannot be decoded because the directory is readonly
create a temporary file. This fixes #688011.

Got rid of the install() method in macresource, and replaced it with
a resource_filename() method which will optionally decode a given resourcefile
(which may be applesingle-encoded) and return the real resourcefile.

Use this new method in buildtools to copy the correct resource file to
the bundle. This fixes #688007.
diff --git a/Lib/plat-mac/buildtools.py b/Lib/plat-mac/buildtools.py
index 470f016..56f23a4 100644
--- a/Lib/plat-mac/buildtools.py
+++ b/Lib/plat-mac/buildtools.py
@@ -299,7 +299,9 @@
 	builder.builddir = destdir
 	builder.name = shortname
 	if rsrcname:
-		builder.resources.append(rsrcname)
+		realrsrcname = macresource.resource_pathname(rsrcname)
+		builder.files.append((realrsrcname, 
+			os.path.join('Contents/Resources', os.path.basename(rsrcname))))
 	for o in others:
 		if type(o) == str:
 			builder.resources.append(o)