added isempty for checking empty dirs, and slightly modified poptmp
removed verbose
changed pushtmp/poptmp from functions to aliases