Adds swap_file module. Closes #814