Fix Delete.Directory() error by catching exception and trying again.

See http://stackoverflow.com/questions/329355/cannot-delete-directory-with-directory-deletepath-true/1703799#1703799 for details.