Fixed current directory retrieving for linux.