Make it go up until it finds a valid folder