This part
`
if (currentPath[currentPath.size()-1] != '/')
{
currentPath += "/";
}
return Path(currentPath+leaf);
`
when currentPath is uninitialized will descend into /leaf instead of the intended ./leaf
Piggy shouldn't accidentally give access to folders in the top of the file system.