Compress function for compressing files/folders to tar.gz