Quantum mechanical free energy calculations using path integral molecular dynamics