Finish implementing 'stack' function

Requires ‘blockify’ functionality, but ‘blockify’ cannot be run
properly with decorators from click; therefore, its code content moved
to ‘blockfile_to_block’.