Check if private_key_path is an array or string and use appropriately.