Path integral methods for primordial density perturbations - sampling of constrained Gaussian random fields