adding support for port ranges on --expose

Addresses #1834

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Changed code as above, it is lot cleaner.