Added alternate method for listing directory contents that modifies existing vector.