I've found a script which does exactly what I need it to do (basically cleaning up a mask path I created using auto-trace). The only problem is that it only works on masks that aren't animated. From what I can tell from other users' comments, if you try to use it on an animated mask, it will effect the mask at the frame which corresponds to the playhead, but then the remaining frames remain the same.
So, what I'm looking for is a script that will automate the process of running the script for every frame within my work area? I feel like this workaround should work, but I know nothing about scripting and can't seem to find a script that will do this in any of my google searches.