Added platform option

Hi, I have divided #1164 pull request, this is the --platform flag part. I still cannot get the 
specs to work.