The "working" directory should exist in the `LITHIUM_APP_PATH` constant, which may differ from the results of `getcwd()` when using an absolute path to `li3` and the `--app` option.
Using the `-f` flag to `readlink` ensures that relative symlinks are dereferenced correctly.