Locate Application Support directory in runtime

- avoid hardcoded paths
- add some error logging in `-pathForDataFile`