Cherry-pick (master -> release-0.4)

* Fix Remove-Item to not throw an exception
  I4e8b80d05fd566190ee53661100e2a48ee28cc1c

Change-Id: I55dba851cfca067d7be87f7dc94955ae39121f99