Handle symbolic links when determining cur dir. Use forward slash for linux dirs