Improved option files/1, to support directories and lists