Create stocksettings directory on startup if necessary
Merge remote-tracking branch 'lethsor/stockpiles-directory' into stockpiles
stockpiles: more error handling & cleanup

* prevent crashes when the path doesn't exist
* remove duplicated functions
* sort file list case insensitively