Is a Directory in PHP and JQuery