Changing the owner of a directory when username has a . (dot) in it If I enter whoami in Terminal.app my id is shown as Abhi.Sri

Now if I do  chown -R Abhi.Sri /usr/local it says the user Abhi.Sri is invalid.
I think your short username is malformed. I recommend to rename it to lower case characters (and no special characters except the underscore).

Additionally you would have to use a sudoers account (e.g. an admin account) and prepend sudo to change ownership of /usr/local since /usr/local is owned by root:wheel. Changing the ownership of /usr/local and subsequent items is non-standard and not recommended.