Replace invalid filename characters