Handle script directory.