added option to not follow symlinks when resolving cwd