Improved CLI argument checking

Trim trailing slash from directory paths for iput