Added platform option

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