code: def remove_not_allowed_chars(savepath):
          
          split_savepath = os.path.splitdrive(savepath)
          # https://msdn.microsoft.com/en-us/library/aa365247.aspx
          savepath_without_invalid_chars = re.sub(r'<|>|:|\"|\||\?|\*', '_',
                                                  split_savepath[1])
          return split_savepath[0] + savepath_without_invalid_chars
docs: Removes invalid filepath characters from the savepath.
  
          :param str savepath: the savepath to work on
          :return str: the savepath without invalid filepath characters