Add actionfile() function
Add actionfile() function

This refactors a portion of the action() function out into a separate
actionfile() function, for getting the script that corresponds to a
given action.

DMBuce/clicraft