when reverting, remove untracked files and directories

otherwise, newly created files by patches causes problems.
include r263019