Research current directory and change directory to JavaScript code