composer/composer — pull request #1535 by johnstevenson (2013-01-28 16:17:03+00:00)
Title: Fix unlink(folder) failure on Windows using removeDirectory()

When using Windows (tested on Vista), ```unlink``` -ing a directory will fail. This is used in ```Composer\Factory::createConfig()``` when updating legacy paths and attempting to remove the old directories.

This PR uses removeDirectory() from ```Composer\Utils\Filesystem```, rather than the native ```rmdir()``` in case the directory is not empty.