Retrieves the path to the current folder.
The function fails if there is no folder selected in the list control.