Changes to fix rebag by using Bag-Id in bag-info.txt file. Fixes #59

Merge this pull request before merging #137