Added check for bad argument references
Closes #77, output to target location, at least for simple files