used 'basename' rather than pattern to define destination filename. closes #1