Better pattern matching for check-style job

Change-Id: I21128673941d68fae2d8723cb7fe9f19c59fd41b
diff --git a/jjb/OnosSystemTest/check-style.sh b/jjb/OnosSystemTest/check-style.sh
index 9e26c36..4be4b4c 100644
--- a/jjb/OnosSystemTest/check-style.sh
+++ b/jjb/OnosSystemTest/check-style.sh
@@ -8,7 +8,7 @@
 
 cd
 cd $WORKSPACE/OnosSystemTest/
-modifiedFiles=$(git diff-tree --no-commit-id --name-only -r HEAD | grep \.py) || modifiedFiles=""
+modifiedFiles=$(git diff-tree --no-commit-id --name-only -r HEAD | grep \.py$) || modifiedFiles=""
 if [ -n "$modifiedFiles" ]
 then
 	pep8 --repeat --show-source --show-pep8 --ignore=E251,E201,E302,E202,E126,E127,E203,E226,E501,W391 $modifiedFiles > $WORKSPACE/pep8Result.txt
@@ -20,4 +20,4 @@
 fi
 
 cat $WORKSPACE/pep8Result.txt
-rm -rf $WORKSPACE/OnosSystemTest/
\ No newline at end of file
+rm -rf $WORKSPACE/OnosSystemTest/