prevent read/write access from/to an empty tensor to segfault with negative indices
Merge branch 'master' of github.com:torch/torch7