Added Dir.php and started tests