encoding/xml: fix panic in Marshal

Fixes issue 6341.

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/13512048
path/filepath: fix race with other tests

Bug3486 tried to walk the entire file tree, but other tests might
be creating and removing files in that tree. In particular, package os
creates and removes files in the os directory, and issue 5863
reports failures due to seeing those files appear and then disappear.

Change the test to walk just the test tree, which should not be
changing.

Fixes issue 5863.

R=golang-dev, bradfitz
CC=golang-dev
https://codereview.appspot.com/13467045