Pyrite thin films on amorphous substrates: Interaction with the substrate and doping effects