A bound on the primes of bad reduction for CM curves of genus 3