Use __DIR__ instead of getcwd()

getcwd() returns the directory in which the user last changed to,
irrelevant of where ladder.php is located. In other words, if you do
“cd /root/test/“ followed by “php /vendor/lib/ladder/ladder.php”,
getcwd() will return /root/test.

Using the __DIR__ constant, on the other hand, always uses the
directory location of the file containing the __DIR__ constant. In
other words, no matter how you launch ladder.php, it will always return
the correct directory.