Correctly sanitise the directory path in finder

http://tracker.phpbb.com/browse/PHPBB3-11362