Fixes a potential problem with experiment dir being specified with ~

As per #8 , this fixes a potential problem where the path to the experiment dir begins with the ~ character.