Fixed sorting for filenames
Auto-creating base-directories only when write is enabled