fixed js path
changed option from --dir to --directory
script reference from the Internet