Improved lsfiles command according to discussion from pull request (#659)