The call to realpath was so that project path didn't have two trailing slashes. If someone types "/path/", this will result in project path being "/path//".