[PATCH] make file merging respect permissions