ensuring js dir