Yes. You can read a proof of this fact at: https://math.stackexchange.com/questions/75812/does-localisation-commute-with-hom-for-finitely-generated-modules