Switched to using boost for listing directory contents.