Fix the attach behavior with -i
Merge pull request #1995 from dotcloud/fix_attach_2

Fix the attach behavior with -i